class CreateStoreOrders < ActiveRecord::Migration[5.0]
  def change
    create_table :store_orders do |t|
      t.integer :store_id
      t.integer :store_customer_id
      t.string :user_name
      t.string :company_name
      t.string :phone_number
      t.integer :status, default: 0
      t.integer :paid_at
      t.integer :pay_status, default: 0
      t.string :remark
      t.decimal :amount
      t.string :numero
      t.string :address


      t.timestamps
    end
    add_index :store_orders, :company_name
    add_index :store_orders, :store_customer_id
    add_index :store_orders, :store_id
    add_index :store_orders, :phone_number
    add_index :store_orders, :numero
  end
end
